gusucode.com > 现代通信系统——使用MATLAB(+全部程序) > 现代通信系统——使用MATLAB(+全部程序)/现代通信系统——使用MATLAB(+全部程序)/Matlab 程序/Chapter1/spower.m

    function p=spower(x)
%       p=spower(x)
%SPOWER     returns the power in signal x
p=(norm(x)^2)/length(x);